package com.yunhe.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import com.yun.dao.AddMainDao;
import com.yun.dao.AdminFenYe;
import com.yunhe.bean.Admin;
import com.yunhe.bean.ShopUser;
import com.yunhe.service.AdminService;
import com.yunhe.service.UserService;
import com.yunhe.util.MySession;

public class ce {
@Test
/*   public void ce1(){
	 SqlSession se=new MySession().getSession();
		AddMainDao mapper = se.getMapper(AddMainDao.class);
		
		List<Admin> list=mapper.checkAdmin();
		
			System.out.println(list);
		
	
 }*/
/* public void ce2(){
	 SqlSession se=new MySession().getSession();
	 AddMainDao mapper=se.getMapper(AddMainDao.class);
	 Admin admin =new Admin();
	 admin.setAname("admin123");
	 List<Admin> list =mapper.checkAdmin(admin);
	 System.out.println(list);
 }
 */
/* public void ce1(){
	 SqlSession se =new  MySession().getSession();
	 AddMainDao mapper =se.getMapper(AddMainDao.class);
	 Admin admin =new Admin();
	 admin.setAname("zhangsan2");
	 admin.setApass("123456");
	 admin.setEmail("836738564@qq.com");
	 admin.setTel("132545678451");
	 int a  = mapper.addAdmin(admin);
	 System.out.println(a);
	 se.commit();
 } */
//	public void ce1(){
//		String aname = "dsadsa";
//		Admin admin =new Admin();
//		admin.setAname(aname);
//		AdminService adms = new AdminService();
//		List<Admin> a =adms.selectAdmin(admin);
//		System.out.println(a);
//// }
//public void  ce(){
//	 
//	 AdminService adms =new AdminService();
//	 
//	 Admin admin = new Admin();
//		admin.setAid(34);
//		admin.setAid(35);
//		admin.setAid(96);
//	 int a  =adms.deleteAlladmin(admin);
//	System.out.println(a);
//	
//	 
//	
//}
/*	public void ce(){
		UserService uss =new UserService();
		ShopUser sh = new ShopUser();
		String uname ="zhangsan";
		sh.setUname(uname);
		boolean  b=uss.checkUser(sh);
		System.out.println(b);
		
	}*/
	public void ce(){
		UserService uss = new UserService();
		ShopUser su = new ShopUser();
		String  uname = "zhangsan";
		su.setUname(uname);
		List<ShopUser> list=uss.getSelect(su);
		System.out.println(list);
	}
	
}
